import request from '@/utils/request'

export interface LoginData {
  permissions: string[],
  roles: string[],
  user: {
    admin?: boolean,
    avatar?: string,
    createBy?: string,
    createTime?: string,
    delFlag?: string,
    email?: string,
    userName?: string,
    userId?: string
  }
}

// 获取用户详细信息
export default function getInfo() {
  return request<LoginData>({
    url: '/getInfo',
    method: 'get'
  })
}
